﻿<!-- #include file="ding.asp" -->
<!-- #include file="mymin.asp" -->
<%Call Head2()%>
<title>添加栏目类别</title></head><body><div class="main400">
<%
Dim id,lxl,class1,relid,num
IF KEY<>0 then
	Call Error2("你的权限不足！")
end if
id= cint(request("id"))
lxl= cint(request("lxl"))
class1=request("class1")
relid=request("relid")
num=request("num")
if class1="" then
	Call Error2("栏目名称不能为空！")
end if
if relid="" or IsNumeric(relid)=False then
	relid=0
end if
if num="" or IsNumeric(num)=False then
	num=0
end if
Dim pid
pid=request.form("pid")
if pid="" or IsNumeric(pid)=False then
	Call Error2("排序无效！")
end if
Dim br
br=request.form("br")
if br="" or IsNumeric(br)=False then
	Call Error2("换行无效！")
end if
Dim lx
lx=request.form("lx")
if lx="" or IsNumeric(lx)=False then
	Call Error2("类型无效！")
end if
Dim parent
parent=request.form("parent")
if parent="" or IsNumeric(parent)=False then parent=0
lid=request.form("lid")
if lid <>"" then
	if IsNumeric(lid)=False then
		Call Error2("ID无效！")
	end if
	relid=lid
end if
Dim wmltxt
wmltxt=request.form("wmltxt")
Dim rs
set rs=server.createobject("adodb.recordset")
rs.open "select * from 74hu_class",myconn,2,3
rs.addnew
rs("class")=class1
rs("pid")=pid
rs("br")=br
rs("lx")=lx
rs("parent")=parent
rs("relid")=relid
rs("wmltxt")=wmltxt
rs("num")=num
rs.update
rs.close
set rs=nothing

%>
栏目添加成功!
<br/>----------<br/>
<%if id<>0 then %>
<a href="Clist.asp?sid=<%=sid%>&amp;id=<%=id%>&amp;lx=<%=lxl%>">[栏目分类]</a><br/>
<%end if%>
<a href='class.asp?sid=<%=sid%>'>[栏目分类]</a><%Call rootLast2%>